package com.street.mapper;

import com.street.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper {
    @Select("select id, openid, name, phone, sex, avatar from user where openid=#{openid}")
    User getByOpenid(String openid);

    @Insert("insert into  user(openid,create_time) " +
            "values (#{openid},#{createTime})")
    void insert(User user);

}
